package com.fone.player.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 收藏&缓存bean
 * 
 * @author Jason_Zue
 * 
 */
public class CacheItemBean implements Parcelable {
	public final static String CACHE_ITEM_BEAN_LIST = "cache_item_bean_list";
	public final static int WAITING = 1; // 等待
	public final static int PAUSE = 2; // 暂停
	public final static int DOWNLOADING = 3; // 下载中
	public final static int FINISH = 4; // 完成
	public final static int ERROR = 5; // 出错
	public final static int NOTDOWNLOADED = 6; // 未下载(没添加到列表中)

	public final static int MOVIE = 1; // 电影
	public final static int TV = 2; // 电视剧
	public final static int ANIMATION = 3; // 动画
	public final static int VARIETY = 4; // 综艺
	public final static int ORIGINAL = 5; // 原创
	public final static int LIVE = 6; // 直播
	public final static int LIVE_AUDIO = 7; // 直播音频
	public final static int NEWS = 8; // 新闻
	public final static int SHORT_FILM = 9; // 短剧
	public final static int WEBPAGE = 10; // 网页

	private String itemName; // 条目内容
	private String ImageUrl; // 图片地址
	private String season; // 集数&季数
	private String updateInfo; // 更新信息
	private String downloadedSize;// 已下载大小
	private String totalSize;// 总大小
	private int downloadStatus; // 下载状态
	private int collectionType; // 条目分类
	private boolean downloadSelected; // 下载选中状态
	private boolean deleteSelected; // 删除选中状态
	private String episode; // 选集编号
	private String detailUrl; // 详情地址信息
	private String fullScreenUrl; // 全屏播放地址
	private String downloadUrl; // 资源下载路径
	private String dramaUrl; // 剧集请求接口
	private String CID;
	private String CCID;
	private String videoId;
	private String CLID;
	private int synchronizeType;// 同步类型

	@Override
	public void writeToParcel(Parcel out, int flags) {
		out.writeInt(downloadSelected ? 1 : 0);
		out.writeInt(deleteSelected ? 1 : 0);
		out.writeInt(downloadStatus);
		out.writeString(itemName);
		out.writeString(season);
		out.writeString(episode);
		out.writeString(downloadedSize);
		out.writeString(totalSize);
		out.writeString(ImageUrl);
		out.writeInt(collectionType);
		out.writeString(updateInfo);
		out.writeString(detailUrl);
		out.writeString(fullScreenUrl);
		out.writeString(downloadUrl);
		out.writeString(dramaUrl);
		out.writeString(CID);
		out.writeString(CCID);
		out.writeString(videoId);
		out.writeString(CLID);
		out.writeInt(synchronizeType);

	}

	public static final Parcelable.Creator<CacheItemBean> CREATOR = new Parcelable.Creator<CacheItemBean>() {
		public CacheItemBean createFromParcel(Parcel in) {
			return new CacheItemBean(in);
		}

		public CacheItemBean[] newArray(int size) {
			return new CacheItemBean[size];
		}
	};

	private CacheItemBean(Parcel in) {
		downloadSelected = in.readInt() == 1;
		deleteSelected = in.readInt() == 1;
		downloadStatus = in.readInt();
		itemName = in.readString();
		season = in.readString();
		episode = in.readString();
		downloadedSize = in.readString();
		totalSize = in.readString();
		ImageUrl = in.readString();
		collectionType = in.readInt();
		updateInfo = in.readString();
		detailUrl = in.readString();
		fullScreenUrl = in.readString();
		downloadUrl = in.readString();
		dramaUrl = in.readString();
		CID = in.readString();
		CCID = in.readString();
		videoId = in.readString();
		CLID = in.readString();
		synchronizeType = in.readInt();
	}

	@Override
	public int describeContents() {
		return 0;
	}

	public CacheItemBean() {
	}

	public String getVideoId() {
		return videoId;
	}

	public void setVideoId(String videoId) {

		this.videoId = videoId;
	}
	

	public String getCID() {
		return CID;
	}

	public void setCID(String cID) {
	
		CID = cID;
	}

	public String getCCID() {
		return CCID;
	}

	public void setCCID(String cCID) {
	
		CCID = cCID;
	}

	public String getCLID() {
		return CLID;
	}

	public void setCLID(String cLID) {
	
		CLID = cLID;
	}

	public int getSynchronizeType() {
		return synchronizeType;
	}

	public void setSynchronizeType(int synchronizeType) {
	
		this.synchronizeType = synchronizeType;
	}

	public boolean getDownloadSelected() {
		return downloadSelected;
	}

	public void setDownloadSelected(boolean isDownloadSelected) {
		this.downloadSelected = isDownloadSelected;
	}

	public boolean getDeleteSelected() {
		return deleteSelected;
	}

	public void setDeleteSelected(boolean deleteSelected) {
		this.deleteSelected = deleteSelected;
	}

	public int getDownloadStatus() {
		return downloadStatus;
	}

	public void setDownloadStatus(int downloadStatus) {
		this.downloadStatus = downloadStatus;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	public String getSeason() {
		return season;
	}

	public void setSeason(String season) {
		this.season = season;
	}

	public String getDownloadedSize() {
		return downloadedSize;
	}

	public void setDownloadedSize(String downloadedSize) {
		this.downloadedSize = downloadedSize;
	}

	public String getTotalSize() {
		return totalSize;
	}

	public void setTotalSize(String totalSize) {
		this.totalSize = totalSize;
	}

	public String getImageUrl() {
		return ImageUrl;
	}

	public void setImageUrl(String imageUrl) {
		ImageUrl = imageUrl;
	}

	public int getCollectionType() {
		return collectionType;
	}

	public void setCollectionType(int collectionType) {
		this.collectionType = collectionType;
	}

	public String getUpdateInfo() {
		return updateInfo;
	}

	public void setUpdateInfo(String updateInfo) {
		this.updateInfo = updateInfo;
	}

	public String getEpisode() {
		return episode;
	}

	public void setEpisode(String episode) {

		this.episode = episode;
	}

	public String getDetailUrl() {
		return detailUrl;
	}

	public void setDetailUrl(String detailUrl) {

		this.detailUrl = detailUrl;
	}

	public String getFullScreenUrl() {
		return fullScreenUrl;
	}

	public void setFullScreenUrl(String fullScreenUrl) {

		this.fullScreenUrl = fullScreenUrl;
	}

	public String getDownloadUrl() {
		return downloadUrl;
	}

	public void setDownloadUrl(String downloadUrl) {

		this.downloadUrl = downloadUrl;
	}

	public String getDramaUrl() {
		return dramaUrl;
	}

	public void setDramaUrl(String dramaUrl) {

		this.dramaUrl = dramaUrl;
	}

	@Override
	public String toString() {
		return "CacheItemBean [downloadSelected=" + downloadSelected
				+ ", deleteSelected=" + deleteSelected + ", downloadStatus="
				+ downloadStatus + ", itemName=" + itemName + ", season="
				+ season + ", episode=" + episode + ", downloadedSize="
				+ downloadedSize + ", totalSize=" + totalSize + ", ImageUrl="
				+ ImageUrl + ", collectionType=" + collectionType
				+ ", updateInfo=" + updateInfo + ", detailUrl=" + detailUrl
				+ ", fullScreenUrl=" + fullScreenUrl + ", downloadUrl="
				+ downloadUrl + ", dramaUrl=" + dramaUrl + ", CID=" + CID
				+ ", CCID=" + CCID + ", videoId=" + videoId + ", CLID=" + CLID
				+ ", synchronizeType=" + synchronizeType + "]";
	}

}
